home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 7 / Amiga Format AFCD07 (Dec 1996, Issue 91).iso / serious / shareware / programming / aros / alib / newobject.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-09-12  |  2.0 KB  |  84 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: newobject.c,v 1.1 1996/08/28 17:52:29 digulla Exp $
  4.     $Log: newobject.c,v $
  5.     Revision 1.1  1996/08/28 17:52:29  digulla
  6.     First step to implement amiga.lib
  7.     BOOPSI Utility functions
  8.  
  9.  
  10.     Desc:
  11.     Lang: english
  12. */
  13. #include <intuition/classes.h>
  14. #include <intuition/intuitionbase.h>
  15. #include <stdarg.h>
  16.  
  17. extern struct IntuitionBase * IntuitionBase;
  18.  
  19. /*****************************************************************************
  20.  
  21.     NAME */
  22.     #include <intuition/classusr.h>
  23.     #include <clib/intuition_protos.h>
  24.  
  25.     APTR NewObject (
  26.  
  27. /*  SYNOPSIS */
  28.     struct IClass * classPtr,
  29.     UBYTE          * classID,
  30.     unsigned long    tag1,
  31.     ...        )
  32.  
  33. /*  FUNCTION
  34.     Use this function to create BOOPSI objects (BOOPSI stands for
  35.     "Basic Object Oriented Programming System for Intuition).
  36.  
  37.     You may specify a class either by it's name (if it's a public class)
  38.     or by a pointer to its definition (if it's a private class). If
  39.     classPtr is NULL, classID is used.
  40.  
  41.     INPUTS
  42.     classPtr - Pointer to a private class (or a public class if you
  43.         happen to have a pointer to it)
  44.     classID - Name of a public class
  45.     tagList - Initial attributes. Read the documentation of the class
  46.         carefully to find out which attributes must be specified
  47.         here and which can.
  48.  
  49.     RESULT
  50.     A BOOPSI object which can be manipulated with general functions and
  51.     which must be disposed with DisposeObject() later.
  52.  
  53.     NOTES
  54.     This functions send OM_NEW to the dispatcher of the class.
  55.  
  56.     EXAMPLE
  57.  
  58.     BUGS
  59.  
  60.     SEE ALSO
  61.     DisposeObject(), SetAttrs(), GetAttr(), MakeClass(),
  62.     "Basic Object-Oriented Programming System for Intuition" and
  63.     "boopsi Class Reference" Dokument.
  64.  
  65.     INTERNALS
  66.  
  67.     HISTORY
  68.     29-10-95    digulla automatically created from
  69.                 intuition_lib.fd and clib/intuition_protos.h
  70.  
  71. *****************************************************************************/
  72. {
  73.     va_list args;
  74.     APTR    object;
  75.  
  76.     va_start (args, tag1);
  77.  
  78.     object = NewObjectA (classPtr, classID, (struct TagItem *)&tag1);
  79.  
  80.     va_end (args);
  81.  
  82.     return object;
  83. } /* NewObject */
  84.